package com.ivan.server.controller;

import com.ivan.common.bean.entity.Member;
import com.ivan.common.util.IvanTool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Ivan
 * @Title: MemberController
 * @date 2021/7/816:42
 */
@RestController
@RequestMapping("/server")
public class MemberController {

    @GetMapping("/members")
    public List<Member> members() {
        List<Member> members = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            members.add(new Member(IvanTool.id(), "member" + i, 20 + i));
        }
        return members;
    }
}
